package com.offcn.service.impl;

import com.offcn.dao.UserMapper;
import com.offcn.po.User;
import com.offcn.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserMapper userMapper;

    public void save(User user) {
        userMapper.save(user);
    }

    public void update(User user) {
        userMapper.update(user);
    }

    public void delete(Long id) {
        userMapper.delete(id);
    }

    public List<User> getAll() {
        return userMapper.getAll();
    }

    public User findOne(Long id) {
        return userMapper.findOne(id);
    }
}
